From: Jo-Philipp Wich Date: Wed, 30 Mar 2022 12:09:10 +0000 (+0200) Subject: luci-base: ucitrack: fix broken affects logic X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=825efa24b70750d3fe960a95348b0d0efe626052;p=project%2Fluci.git luci-base: ucitrack: fix broken affects logic Changes on a given configuration should trigger change events on affected configurations, not the other way around. Fixes: #5745 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 71106351344ea390e0f510e3f9ad34685bacc1ee) --- diff --git a/modules/luci-base/root/etc/init.d/ucitrack b/modules/luci-base/root/etc/init.d/ucitrack index c7ceb32905..57ac11857f 100755 --- a/modules/luci-base/root/etc/init.d/ucitrack +++ b/modules/luci-base/root/etc/init.d/ucitrack @@ -41,10 +41,10 @@ register_trigger() { fi for affected in $affects; do - logger -t "ucitrack" "Setting up /etc/config/$config reload dependency on /etc/config/$affected" - procd_add_config_trigger "config.change" "$affected" \ + logger -t "ucitrack" "Setting up /etc/config/$affected reload dependency on /etc/config/$config" + procd_add_config_trigger "config.change" "$config" \ ubus call service event \ - "$(printf '{"type":"config.change","data":{"package":"%s"}}' $config)" + "$(printf '{"type":"config.change","data":{"package":"%s"}}' $affected)" done }